package nc.bs.arap.swjt.bg;

import java.util.LinkedHashMap;

import nc.bs.arap.swjt.bp.AutoSwjtBp;
import nc.bs.pub.pa.PreAlertObject;
import nc.bs.pub.taskcenter.BgWorkingContext;
import nc.bs.pub.taskcenter.IBackgroundWorkPlugin;
import nc.vo.pub.BusinessException;
import nc.vo.pub.lang.UFDateTime;

public class AutoSwjtBg implements IBackgroundWorkPlugin {

	@Override
	public PreAlertObject executeTask(BgWorkingContext context) throws BusinessException {
		
		LinkedHashMap param = context.getKeyMap();
		
		String monitime_str = (String) param.get("monitime");monitime_str = monitime_str == null ? "" : monitime_str.trim();
		UFDateTime monitime = null;
		if(monitime_str.length() == 10) {
			monitime = new UFDateTime(monitime_str + " 00:00:00");
		}
		
		new AutoSwjtBp().exec(monitime);
		
		return null;
	}

}
